<template>
  <br />
  <van-nav-bar
      :title='name'
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
      v-show="$route.path != '/owner'"
  />

  <router-view> </router-view>
</template>

<script lang="ts">
import { useRouter} from "vue-router";

export default {
  setup(){
    const router = useRouter();
    let name ;
    if(router.currentRoute.value.name){
      name = router.currentRoute.value.name;
    }
    return {
      router,name,
    }
  },
  methods:{
    onClickLeft(){
      ( this as any ).router.push({path:"/owner"})
    }
  }
};
</script>

<style></style>
